﻿@model BlackBox.Controllers.HomeController.EntryViewModel

@{
    ViewBag.Title = "SearchBox";
}

<div id="search-results">
    <h3>Search Results</h3>

    @if(Model.UserData != null || Model.GameData != null || Model.NewsData != null || Model.GroupData != null)
    {
        if(Model.UserData != null)
        {
            <div>
                <p>User found !</p>               
                <a href="~/Account/Profile?name=@Model.UserData.UserName">@Model.UserData.UserName</a>
            </div>
        }
        if(Model.GameData != null)
        {
            <div>
                <p>Game found !</p>               
                <a href="~/Game/Game/@Model.GameData.id">@Model.GameData.name</a>
            </div>
        }
        if(Model.NewsData != null)
        {
            <div>
                <p>News story found !</p>               
                <a href="~/Home/News">@Model.NewsData.title</a>
            </div>
        }
        if(Model.GroupData != null)
        {
            <div>
                <p>Group found !</p>               
                <a href="~/Account/Group/@Model.GroupData.id">@Model.GroupData.name</a>
            </div>
        }
    }
    else
    {
        <h4>No results</h4>
    }
</div>